<template lang="pug">
  kalix-dialog.user-add(title='编辑' bizKey="maintainItem" ref="kalixBizDialog"
    v-bind:formModel.sync="formModel" v-bind:targetURL="targetURL")
    div.el-form(slot="dialogFormSlot")
      input(v-model="formModel.examScoreId" type="hidden")
      el-form-item(label="题干" prop="stem" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.stem" readonly)
      el-form-item(label="评分项" prop="standerItem" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.standerItem" readonly)
      el-form-item(label="总分" prop="itemScore" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.itemScore" readonly)
      el-form-item(label="打分" prop="standerItemScore" v-bind:label-width="labelWidth")
        el-input-number(v-model="formModel.standerItemScore" v-bind:min="0" v-bind:max="formModel.itemScore")
</template>

<script type="text/ecmascript-6">
  import FormModel from './resultItemModel'
  export default {
    name: 'MaintainItemEdit',
    data() {
      return {
        formModel: Object.assign({}, FormModel),
        labelWidth: '180px',
        targetURL: null
      }
    },
    methods: {
      init(dialogOption) {
        this.targetURL = "/camel/rest/examscores/" + dialogOption.examScoreId + "/maintainscores"
      }
    }
  }
</script>

<style scoped lang="stylus" type="text/stylus">
</style>
